Skip to content

feat: Create DisputeDetailPage with resolution section#220

Open
OpadijoIdris wants to merge 1 commit intoamina69:mainfrom
OpadijoIdris:feature/dispute-detail-page-resolution-section
Open

feat: Create DisputeDetailPage with resolution section#220
OpadijoIdris wants to merge 1 commit intoamina69:mainfrom
OpadijoIdris:feature/dispute-detail-page-resolution-section

Conversation

@OpadijoIdris
Copy link
Copy Markdown

Pull Request Template

Title: feat: Add DisputeDetailPage with resolution section

Description:

This PR implements the DisputeDetailPage with a resolution section that displays dispute resolution details only when the dispute status is RESOLVED, as specified in task #195.

Related Issue

Closes #195

Changes Made:

Core Implementation

  • Add dispute types with RESOLVED status and resolution details

    • Created src/types/dispute.ts with comprehensive type definitions
    • Added DisputeStatus enum: OPEN, UNDER_REVIEW, RESOLVED, CLOSED
    • Added ResolutionType enum: REFUND, RELEASE, SPLIT
    • Defined DisputeResolution interface with all required fields
  • Create DisputeDetailPage component

    • Added src/pages/DisputeDetailPage.tsx with basic page structure
    • Includes placeholder for dispute details (ready for API integration)
  • Create DisputeResolutionSection that shows only when status=RESOLVED

    • Added src/components/dispute/DisputeResolutionSection.tsx
    • Component conditionally renders only when dispute.status === "RESOLVED"
    • Clean, accessible UI with proper spacing and typography
  • Display resolution type badge, admin note, resolved by, resolvedAt

    • Resolution type shown as a colored badge (REFUND/RELEASE/SPLIT)
    • Admin note displayed in a dedicated section
    • Resolved by and resolvedAt fields with proper formatting
    • Localized date display using toLocaleString()
  • Render SplitOutcomeChart for SPLIT resolutions

    • Conditionally renders SplitOutcomeChart component when resolution.type === "SPLIT"
    • Passes distribution data for visual representation
    • Chart shows recipient amounts and percentages
  • Show StellarTxLink for resolutionTxHash using VITE_STELLAR_NETWORK

    • Integrates existing StellarTxLink component
    • Uses VITE_STELLAR_NETWORK environment variable for correct explorer URLs
    • Supports both testnet and mainnet configurations
  • Add route for /dispute/:id

    • Updated src/App.tsx to include new route
    • Route properly nested within MainLayout for consistent navigation

Testing & Quality

  • Add unit tests for hidden when OPEN, SPLIT renders chart, StellarTxLink present

    • Created comprehensive test suite in src/components/dispute/__tests__/DisputeResolutionSection.test.tsx
    • Test 1: Verifies section is hidden when status === "OPEN"
    • Test 2: Verifies all resolution details render when status === "RESOLVED"
    • Test 3: Verifies SplitOutcomeChart renders for SPLIT resolutions
    • All tests pass with proper assertions for accessibility and functionality
  • Code Quality

    • TypeScript strict typing throughout
    • Follows existing codebase patterns and conventions
    • Proper component composition and reusability
    • Clean imports and exports

Integration

  • Dependencies resolved: All import errors fixed by installing project dependencies
  • Test suite passes: 3/3 new tests passing, no regressions introduced
  • Build verification: Code compiles successfully with TypeScript

Testing:

npm test  # All tests pass including new DisputeResolutionSection tests
npm run build  # Successful compilation

- Add dispute types with RESOLVED status and resolution details
- Create DisputeDetailPage component
- Create DisputeResolutionSection that shows only when status=RESOLVED
- Display resolution type badge, admin note, resolved by, resolvedAt
- Render SplitOutcomeChart for SPLIT resolutions
- Show StellarTxLink for resolutionTxHash using VITE_STELLAR_NETWORK
- Add unit tests for hidden when OPEN, SPLIT renders chart, StellarTxLink present
- Add route for /dispute/:id
@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 27, 2026

@OpadijoIdris Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@amina69
Copy link
Copy Markdown
Owner

amina69 commented Mar 27, 2026

@OpadijoIdris fialed please check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Frontend · Dispute system UI] Create DisputeDetailPage — resolution section

2 participants